package com.xjm.entity.dto;

import com.xjm.constant.Add;
import com.xjm.constant.Update;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class AdminDto {
    @NotNull(message = "id不能为空", groups = {Update.class})
    private Long id;

    @NotBlank(message = "账号不能为空")
    @Size(min = 4, max = 16, message = "账号长度为4-16位")
    private String account;

    @NotBlank(message = "密码不能为空", groups = {Add.class})
    @Size(min = 6, max = 16, message = "密码长度为6-16位")
    private String password;

    @NotBlank(message = "昵称不能为空")
    private String nickname;

    @NotBlank(message = "头像不能为空")
    private String avatar;

    @NotNull(message = "状态" ,groups = {Update.class})
    private Integer status;

    @NotNull(message = "是否是超级管理员不能为空" ,groups = {Update.class})
    private Integer superAdmin;
}
